'use client';

import React from 'react';
import SimpleTradingViewChart from './SimpleTradingViewChart';

interface TradingViewProps {
  symbol: string;
}

export default function TradingViewChart({ symbol }: TradingViewProps) {
  return (
    <div className="bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 h-full flex flex-col">
      {/* 简化的标题栏 */}
      <div className="flex items-center justify-between p-3 border-b border-gray-200 dark:border-gray-700">
        <h3 className="font-semibold text-gray-900 dark:text-white">币安K线图</h3>
        <div className="text-sm text-gray-600 dark:text-gray-400">
          {symbol} · 实时数据
        </div>
      </div>

      {/* K线图内容 - 占满剩余空间 */}
      <div className="flex-1">
        <SimpleTradingViewChart symbol={symbol} />
      </div>
    </div>
  );
}
